<template>
  <div class="app-container">
    <page-header
      :title="pageTitle"
      show-back
    />
    <survey-form
      :value="primaryKey"
      @submit="goBack"
    />
  </div>
</template>
<script>
import PageHeader from '@/components/PageHeader'
import SurveyForm from './components/SurveyForm'
export default {
  components: {
    PageHeader,
    SurveyForm
  },
  inject: ['goBack'],
  data() {
    return {
      model: null
    }
  },
  computed: {
    pageTitle() {
      return this.$route.params.id ? '隐患信息修改' : '隐患排查'
    },
    primaryKey() {
      return this.$route.params.id || 0
    }
  },
  methods: {
    onSubmit() {
      this.goBack()
    }
  }
}
</script>
